With development of cloud computing technologies, more and more cloud service providers provide various cloud services for enterprises. For example, a cloud storage service provider provides a cheap and safe storage space for an enterprise, and a small and medium-sized enterprise may store data as required by virtue of cloud storage, so that expensive lump-sum storage hardware investment is avoided; and a cloud computing service provider provides an extensible computing resource for an enterprise, and the enterprise may increase a required computing resource according to its own business growth requirement, and so on.
When an enterprise uses a resource and a service provided by a cloud service provider, a biggest concern is that the enterprise lacks control over a cloud-side resource. To speed up using of a cloud service by an enterprise, the cloud service provider deploys a cloud gateway inside the enterprise. On the cloud gateway, the enterprise can monitor cloud service traffic and perform actions such as user access authentication, cloud resource access right management, active directory (Active Directory, AD) policy synchronization, and data encryption to ensure security for the enterprise to use the cloud service.
To implement various functions of an enterprise cloud gateway, an enterprise egress router needs to redirect cloud service traffic to the cloud gateway. In an existing cloud service packet redirection solution, the cloud gateway analyzes a Web (network) packet, distinguishes a cloud service from an ordinary webpage Web service according to domain name information of the Web packet, forwards a packet of an ordinary Web service directly, and performs further processing on a cloud service packet. Only a part of Web packets are cloud service packets, and if all Web packets are redirected to the cloud gateway simply, the cloud gateway needs to parse all the Web packets, thereby increasing a processing overhead of the cloud gateway.